package merchant.service;

import java.util.Map;

import com.google.gson.Gson;

import merchant.dao.ChargeDAO;
import merchant.dao.SummaryOfCharge;

import hackathon1212.ServletPojoAdapter;

public class CreateSoc extends ServletPojoAdapter {

	private static final long serialVersionUID = -7886354412677496828L;

	protected SummaryOfCharge getBusinessMethod(Map<String, String[]> params){
		final String json = params.get("soc")[0];
		return ChargeDAO.get().saveSOC((new Gson().fromJson(json, SummaryOfCharge.class)));
	}
	
}
